Photo selection for mobile devices

ABSTRACT

In one embodiment, a computing device receives a request from a mobile device of a user for an image. The computing device determines whether the user is associated with a preferred orientation for viewing an image. The preferred orientation is determined based on the user&#39;s usage patterns with respect to a particular application of the mobile device, or to the user&#39;s interactions with a social-networking system. If the user is associated with a preferred orientation, the image is adjusted to have the preferred orientation and to match display capabilities of the mobile device sending the request. The adjusted image is sent to the mobile device for display.

PRIORITY

This application is a continuation under 35 U.S.C. §120 of U.S. patentapplication Ser. No. 14/448,463, filed 31 Jul. 2014, which is acontinuation under 35 U.S.C. §120 of U.S. patent application Ser. No.13/324,284, filed 13 Dec. 2011, now U.S. Pat. No. 8,854,397.

TECHNICAL FIELD

This disclosure generally relates to mobile devices.

BACKGROUND

A content-distribution network (CDN) may be a system of computers (e.g.edge servers) that cache or store copies of data at various locations.By placing copies of data at locations near end users, a CDN may improveaccess to the data by increasing access bandwidth and redundancy whilereducing access latency. Data cached in a CDN may include, for example,text, graphics, media files (e.g. audio, photo, or video), scripts,Uniform Resources Locators (URLs), and database queries.

A social-networking system, such as a social-networking website, mayenable its users to interact with it and with each other through it. Thesocial-networking system may create and store a record (such as a userprofile) associated with the user. The user profile may includedemographic information on the user, communication-channel informationfor the user, and personal interests of the user. The social-networkingsystem may also create and store a record of the user's relationshipswith other users in the social-networking system (e.g. a social graph),as well as provide social-networking services (e.g. wall-posts,photo-sharing, or instant-messaging) to facilitate social interactionbetween or among users in the social-networking system.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example network environment of a social networkingsystem.

FIG. 2 illustrates an example method of adjusting images for delivery toa mobile device.

FIGS. 3A-3I illustrate adjusting an image for delivery to a mobiledevice.

FIG. 4 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

A social networking system may store records of users and relationshipsbetween users in a social graph comprising a plurality of user nodes, aplurality of concept nodes, and a plurality of edges connecting thenodes. A user node of the social graph may correspond to a user of thesocial networking system. A user may be an individual (human user), anentity (e.g., an enterprise, business, or third party application), or agroup (e.g., of individuals or entities). A user node corresponding to auser may comprise information provided by the user and informationgathered by various system, including the social networking system. Forexample, the user may provide his name, profile picture, contactinformation, birth date, gender, marital status, family status,employment, education background, preferences, interests, and otherdemographical information to be included in the user node. Each usernode of the social graph may correspond to a web page (typically knownas a profile page). For example, in response to a request including auser name, the social networking system can access a user nodecorresponding to the user name, and construct a profile page includingthe name, a profile picture, and other information associated with theuser. A concept node may correspond to a concept of the socialnetworking system. For example, a concept can represent a real-worldentity, such as a movie, a song, a sports team, a celebrity, arestaurant, or a place or a location. An administrative user of aconcept node corresponding to a concept may create the concept node byproviding information of the concept (e.g., by filling out an onlineform), causing the social networking system to create a concept nodecomprising information associate with the concept. Each concept node ofthe social graph may correspond to a web page. For example, in responseto a request including a name, the social networking system can access aconcept node corresponding to the name, and construct a web pageincluding the name and other information associated with the concept. Anedge between a pair of nodes may represent a relationship between thepair of nodes. For example, an edge between two user nodes can representa friendship between two users. For example, the social networkingsystem may construct a web page (or a structured document) of a conceptnode (e.g., a restaurant, a celebrity), incorporating one or moreselectable buttons (e.g., “like”, “check in”) in the web page. A usercan access the page using a web browser hosted by the user's clientdevice and select a selectable button, causing the client device totransmit to the social networking system a request to create an edgebetween a user node of the user and a concept node of the concept,indicating a relationship between the user and the concept (e.g., theuser checks in a restaurant, or the user likes a celebrity). Inaddition, the degree of separation between any tow nodes is defined asthe minimum number of hops required to traverse the social graph fromone node to the other. A degree of separation between two nodes can beconsidered a measure of relatedness between the users or the conceptsrepresented by the two nodes in the social graph.

A social networking system may support a variety of applications, suchas photo sharing, on-line calendars and events, and instant messaging.For example, the social networking system may also include media sharingcapabilities. For example, the social networking system may allow usersto post photographs and other multimedia files to a user's profile page(typically known as wall posts) or in a photo album, both of which maybe accessible to other users of the social networking system. Socialnetworking system may also allow users to configure events. For example,a first user may configure an event with attributes including time anddate of the event, location of the event and other users invited to theevent. The invited users may receive invitations to the event andrespond (such as by accepting the invitation or declining it).Furthermore, social networking system may allow users to maintain apersonal calendar. Similarly to events, the calendar entries may includetimes, dates, locations and identities of other users.

FIG. 1 illustrates an example network environment of a social networkingsystem. In particular embodiments, a social networking system maycomprise one or more data stores 101. For example, the social networkingsystem may store user profile data and social graph information in datastores 101. For example, each data store 101 may comprise one or morestorage devices. In particular embodiments, the social networking systemmay comprise one or more computing devices (e.g., servers) hostingfunctionality directed to operation of the social networking system. Inparticular embodiments, one or more of data stores 101 may be operablyconnected to the social networking system's front end 120. A user of thesocial networking system may access the social networking system using aclient device such as mobile device 122. In particular embodiments,front end 120 may interact with mobile device 122 through network cloud121. For example, front end 120 may be implemented in software programshosted by one or more computing devices of the social networking system.Front end 120 may include web or HTTP server functionality, as well asother functionality, to allow users to access the social networkingsystem.

Mobile device 122 is generally a portable computer or computing deviceincluding functionality for communicating (e.g., remotely) over anetwork. For example, mobile device 122 can be a mobile phone, a tabletcomputer, a laptop computer, a handheld game console, an electronic bookreader, or any other suitable portable devices. Mobile device 122 mayexecute one or more client applications, such as a web browser (e.g.,Microsoft Windows Internet Explorer, Mozilla Firefox, Apple Safari,Google Chrome, and Opera, etc.) or special-purpose client application(e.g., Microsoft Outlook, Facebook for iPhone, etc.), to access or viewcontent over a computer network.

Network cloud 121 may represent a network or collection of networks(such as the Internet, a corporate intranet, a virtual private network,a local area network, a wireless local area network, a cellular network,a wide area network, a metropolitan area network, or a combination oftwo or more such networks) over which mobile devices 122 may access thesocial network system.

In particular embodiments, the social networking system may store indata stores 101 data associated with applications and services providedby the social networking system. In particular embodiments, the socialnetworking system may store user event data in data stores 101. Forexample, a user may register a new event by accessing a clientapplication to define an event name, a time and a location, and causethe newly created event to be stored (e.g., as a concept node) in datastores 101. For example, a user may register with an existing event byaccessing a client application to confirming attending the event, andcause the confirmation to be stored in data stores 101. For example, thesocial networking system may store the confirmation by creating an edgein a social graph between a user node corresponding to the user and aconcept node corresponding to the event, and store the edge in datastores 101.

In particular embodiments, the social networking system may storelocation data in data stores 101. For example, a node of a social graphstored in data stores 101 may comprise location data associated with auser or a concept. For example, location data associated with a concept(e.g., a restaurant) can be an address, or a geographic location (e.g.,a set of geographic coordinates in latitude and longitude). For example,location data associated with a user can be an address, or a geographiclocation of the user's client device (e.g., as determined by IP address,cell tower triangulation, Wi-Fi positioning, Global Positioning Systemor GPS positioning, or any combinations of two or more of thosepositioning methods). For example, location data associated with a usercan be a location of a concept related to the user (e.g., as determinedby a edge between a user node of the user and a concept node of theconcept). For example, a user's location can be a location of an eventthat the user is attending. For example, a user's location can be alocation of a restaurant that the user just checks in to.

In particular embodiments, the social networking system may store mediafiles in data stores 101. For example, a user can use a clientapplication to upload a photo or a set of photos (often called a photoalbum), or a video or audio clip, to the social networking system,causing the social networking system to store the photos or clips indata stores 105. In particular embodiments, a media file stored in datastores 105 may contain metadata (often called “tags”) associated withthe media file. For example, a photo shot by a digital camera maycontain metadata relating to file size, resolution, time stamp, name ofthe camera maker, and/or location (e.g., GPS) coordinates. A user canadd additional metadata values to a photo, or tag a photo, during or inconnection with an upload process. Some examples of tags of a media fileare author, title, comments, event names, time, location, names ofpeople appearing in the media file, or user comment. For example, tagsof a media file can be implemented with the Exchangeable image fileformat (Exif), or a modified version thereof. U.S. Pat. No. 7,945,653,herein incorporated by reference in its entirety and for all purposes,describes methods of enabling a first user of a social networking systemto select a region of a photo and associate the selected region to asecond user, and in response to a confirmation from the second user,storing the association in a database. For example, the socialnetworking system may store the association between photo and the seconduser by creating an edge between a user node corresponding to the seconduser and a concept node corresponding to the photo, and store the edgein data stores 101.

The social networking system may transmit to a user's mobile device 122one or more images to be displayed by mobile device 122. For example, auser may select a link (e.g., a selectable thumbnail image) in a userprofile page displayed in a graphical user interface of an application(e.g., a web browser) hosted by the user's mobile device 122, causingmobile device 122 to transmit to the social networking system a requestcomprising the link. In response to the request, system front end 120may access data stores 101 for one or more images corresponding to thelink, and transmit the images to mobile device 122. The application maydisplay the received images in its graphical user interface. The socialnetworking system may store copies of images (stored in data stores 101)in one or more content distribution networks 130. Content distributionnetwork 130 may comprise application server 131 operatively connected toone or more content data stores 132 storing copies of images from thesocial networking system. For example, each content data store 132 maycomprise one or more storage devices. The social networking system maycommunicate and access content distribution network 130, and vise versa,through network cloud 121. A user using mobile device 122 maycommunicate with content distribution network 130 through network cloud121. For example, in response to the user's request described above,system front end 120 of the social networking system may communicatewith content distribution network 130 (or cause mobile device 121 tocommunicate with content distribution network 130), causing applicationserver 131 to access content data stores 132 for copies of the imagescorresponding to the link, and transmit the copies of the images to theuser's mobile device 122.

A display of a mobile device can often have a display resolutionrelatively smaller than an original size of an image stored in thesocial networking system or content distribution network 130. A displayof a mobile device can often have an aspect ratio (e.g., a ratio ofwidth by length) different from an image stored in the social networkingsystem or content distribution network 130. Furthermore, an aspect ratioof a display of a mobile device may depend on an orientation (e.g.,portrait mode, or landscape mode) of the mobile device. For example,display resolution of a mobile device can be 960 by 640 pixels inlandscape mode, or 640 by 960 pixels in portrait mode, while an imagestored in social networking system or content distribution network 130can have many sizes and aspect ratios (e.g., 1920 by 1080 pixels, 1064by 1600 pixels, 1600 by 1200 pixels, 1200 by 1200 pixels, etc.). Inaddition, different models (from different manufactures) of mobiledevices can have different display resolutions and display aspectratios. It is desirable to adjust an image before transmitting the imageto a mobile device to reduce the image's size (for a relatively smallerdisplay resolution of a mobile device), and thus reducing bandwidth loadfor transmitting the image. If a user of a mobile device is charged bythe amount of data usage with the mobile device, reducing sizes ofimages that the user receives at the mobile device may also reduce theusage charge for the user. It is also desirable to adjust an imagebefore transmitting the image to a mobile device to match the adjustedimage's aspect ratio to an aspect ratio of a display of the mobiledevice. An image adjusted for a mobile device's display resolution anddisplay aspect ratio may also reduce computing resource requirement formanipulating the image for displaying at the mobile device, thusimproving user experience (e.g., smoother animation). As a mobile deviceoften runs solely on its battery, reducing usage of computing resourceof the mobile device may extend the mobile device's battery life.

Particular embodiments herein describe methods of adjusting imagesbefore transmitting the images to a mobile device. Particularembodiments may adjust the images based on the mobile device's displaycapabilities. FIG. 2 illustrates an example method of adjusting imagesfor delivery to a mobile device. The example method of FIG. 2 can beimplemented by a server-side process hosted by one or more computingdevices of the social networking system. In particular embodiments, theserver-side process may receive, from a mobile device (e.g., mobiledevice 122), a request for one or more images (201). In particularembodiments, the request may comprise an identifier of the mobiledevice. For example, a user may access a structured document served bythe social networking system (e.g., a user profile page, or a web pagecorresponding to a concept of the social networking system) in agraphical user interface of an application (e.g., a web browser) hostedby the user's mobile device. The user may select a link to one or moreimages (e.g., a selectable thumbnail image) incorporated in thestructured document, causing the mobile device to transmit to the socialnetworking system a request comprising the link. The request maycomprise an identifier of the mobile device coded using a user-agentheader field of Hypertext Transfer Protocol (HTTP). Example strings ofthe user-agent header field for HTC Desire mobile phone by HTCCorporation and iPad tablet by Apple, Inc., are listed below,respectively:

Mozilla/5.0 (Linux; U; Android 2.1-update1; de-de; HTC Desire 1.19.161.5Build/ERE27) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 MobileSafari/530.17 Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405

In particular embodiments, the server-side process may access one ormore data stores for display capabilities of the mobile device (202). Inparticular embodiments, the server-side process may access the one ormore data stores based on the identifier of the mobile device. Forexample, the server-side process can, based on the identifier of themobile device, access a device description repository for displaycapabilities of the mobile device. The device description repository canbe stored in a third-party website (e.g., Wireless Universal ResourceFiLe or WURFL) or in data stores 101. For example, display capabilitiesof a mobile device can be display resolution (in pixels) in the mobiledevice's display's width direction and display resolution (in pixels) inthe display's height direction. For example, display capabilities of amobile device can be physical sizes in millimeters (width and height) ofthe mobile device's display. For example, display capabilities of amobile device can be whether the mobile device's display supports morethan two orientations for viewing (e.g., portrait mode and landscapemode). Particular embodiments contemplate any suitable methods ofdetermining display capabilities of the mobile device. For example, therequest (for the one or more images) may comprise display capabilities(e.g., display resolution) of the mobile device (e.g., as part of theuser-agent header string of an HTTP request).

In particular embodiments, the server-side process may access datastores 101 for the images, and adjust one or more of the images based onone or more of the display capabilities (203). FIG. 3A illustrates anexample image of a relatively high resolution. The example image of FIG.3A has four objects (311, 312, 313, 314) within the image. The objectscan be people (or faces) or physical objects (e.g., vases, buildings,etc.). In particular embodiments, the server-side process may adjust animage by scaling the image. For example, the server-side process canscale down the image of FIG. 3A to be within a mobile device'srelatively low display resolution. By scaling downward and reducing theimage's size, particular embodiments can reduce bandwidth requirementfor transmitting the image to the mobile device. The scaled image mayleave white space (321) if the image's aspect ratio does not match thedisplay's aspect ratio, as illustrated in FIG. 3B.

In particular embodiments, the server-side process may adjust an imageby cropping the image. For example, the server-side process can identifyobjects in the image of FIG. 3A (e.g., by using a face recognitionsoftware or an object recognition software), identify a region of theimage that includes the objects and is of a same aspect ratio of themobile device's display, and remove (crop) the portion outside theidentified region from the image. By cropping and reducing the image'ssize, particular embodiments can accentuate subject matter of the image(e.g., the four objects in the example image of FIG. 3A) and reducebandwidth requirement for transmitting the image to the mobile device.FIGS. 3C-3D illustrate example cropped images of the example image ofFIG. 3A. FIG. 3C illustrates an example cropped image in a landscapemode of the mobile device. FIG. 3D illustrates an example cropped imagein a portrait mode of the mobile device. Particular embodiments maydetermine cropping an image for delivery to a mobile device in alandscape mode, or in a portrait mode, or in both landscape and portraitmodes (i.e., producing two cropped images for each mode respectively)based device capabilities of the mobile device, a preference of a userof the mobile device, a preference of an application displaying theimage on the mobile device, or any combinations of these factors. Forexample, if the mobile device may have a default orientation (e.g.,portrait mode), the server-side process can crop an image for deliveryto the mobile device in the default orientation. For example, a user ofthe mobile device may prefer viewing photos in portrait mode with themobile device and store his/her preference in data stores 101. Or aclient application hosted by the mobile device can determine a preferredorientation based on the user's usage patterns, and transmit to thesocial networking system a message comprising the user's preferredorientation, causing the social networking system to store the user'spreferred orientation in data stores 101. Or the social networkingsystem can determine a preferred orientation based on the user's usagepatterns, and store the user's preferred orientation in data stores 101.The server-side process can access data stores 101 (e.g., based on auser identifier included in the request for the image) for the user'spreference, and crop the image in the preferred orientation (e.g.,portrait mode). For example, a photo-viewing application of the mobiledevice may have a preferred orientation (e.g., landscape mode) stored indata stores 101. The server-side process can access data stores 101(e.g., based on an application identifier included in the request of theimage) for the preferred orientation, and crop the image in thepreferred orientation (e.g., landscape mode). For example, if there isnot preferred orientation for displaying, the server-side process maycrop the image in both landscape and portrait modes—i.e., producing onecropped image in landscape mode and one cropped image in portrait modefor delivery to the mobile device.

Instead of display capabilities of a mobile device, particularembodiments may adjust an image for delivery to the mobile device basedon a size of a container (e.g., a frame, a window) displaying the imageat the mobile device. For example, an application hosted by the mobiledevice may display the image in a frame overlaying a web page in theapplication's graphical user interface. The mobile device may transmitto the social networking system a request including a size (e.g., lengthand width) of the container. In response to the request, the server-sideprocess can scale or crop the image to fit within the size of thecontainer. In other embodiments, the server-side process may determine asize of a container for an image based on display capabilities of themobile device, a particular layout of a structured document display theweb page, user interface capabilities of the mobile device (e.g., atouch screen or a click wheel), data transmission to the mobile device(e.g., a cellular network or a Wi-Fi network), or any combination of twoor more of these factors.

Particular embodiments may adjust an image for delivery to a mobiledevice based on one or more social contacts of a user of the mobiledevice. For example, particular embodiments may crop the image toinclude only one or more social contacts of the user. For example, theserver-side process may receive a request for the example image of FIG.3A from a user's mobile device. The server-side process may access datastores 101 (e.g., based on a user identifier included in the request)and identify object 313 as a face of the user (e.g., by using a facialrecognition software to compare the example image to the user's profilepicture stored in data stores 101). The server-side process may accesssocial graph information stored in data stores 101, and identify (e.g.,by using a facial recognition software or an object recognition softwareto compare the example image to images stored in data stores 101) one ormore other objects in the example image of FIG. 3A that are within apre-determined threshold degree of separation from the user. Forexample, the server-side process may identify object 312 as afirst-degree friend of the user. For example, the server-side processmay identify object 312 as a celebrity that the user likes (e.g., asthere is an edge connecting a user node corresponding to the user and aconcept node corresponding to the celebrity in the social graph). Theserver-side process can crop the example image of FIG. 3A to includeonly objects 313 and 314 (and fit within the size of the mobile device'sdisplay or a container), as illustrated in FIG. 3E.

Particular embodiments may adjust an image for delivery to a mobiledevice based on location data indicating a location of a user associatedwith the mobile device. For example, the server-side process may receivea request for the example image of FIG. 3A from a user's mobile device.The server-side process may access data stores 101 and identify objects313 as a face of the user. The server-side process may access datastores 101 for the user's location (e.g., the user is currently inParis, or the example image is from a photo album for the user's trip toParis). The server-side process may access data stores 101 for images ofphysical objects of the user's location and identify one or more objectsin the example image related to the user's location. For example, theserver-side process may identify object 314 as a physical object (e.g.,Arc de Triomphe) of the user's location (e.g., Paris), and crop theexample image of FIG. 3A to include only objects 313 and 314 (and fitwithin the size of the mobile device's display or a container), asillustrated in FIG. 3F.

Particular embodiments may adjust one or more images for delivery to amobile device based on portions of those images that will have otherelements overlaid on them once rendered on a web page. For example, aweb page may contain 2 overlapping images by design. For example, theserver-side process may crop the image at the back to only includeportions of the image that are visible once the front image is overlaidon top of it.

Particular embodiments may rotate images through a two-dimensional (2D)or three-dimensional (3D) space based on a desired appearance on amobile device, before delivery to the mobile device. Mobile devices arecapable of rotating images once downloaded, although the cost of doingso may be prohibitive in terms of scrolling speed and processorutilization. For example, a web page may have an image rotated by 30degrees counterclockwise. In particular embodiments, the server-sideprocess may rotate the image, before transmitting the image to themobile device. For example, an image may be rotated so as to appear to‘lift off’ the page by rotating in 3D space. In particular embodiments,the server-side process may calculate this 3D rotation, creating arotated image based on the calculation, and transmit the rotated imageto the mobile device.

Particular embodiments may apply one or more filters to an image basedon a desired effect, before delivery the image to a mobile device. Forexample, a filter can be an adjustment in hue, brightness, or colorlevel of an image. For example, a filter can display pixels within animage to produce a desired effect (e.g., a funhouse-mirror effect, orremoving blurriness of an image). Particular embodiments contemplate anysuitable image filers. In particular embodiments, the server-sideprocess may apply one or more filters to an image based on a desiredeffect, and transmit the filtered image to the mobile device.

Particular embodiments contemplate any combination of adjustments to animage for delivery the image to a mobile device. For example, theserver-side process may first scale down the example image of FIG. 3Aand than crop the example image to include not only the objects (e.g.,311, 312, 313, and 314) but also a portion of the environmentsurrounding the objects. The scaled and cropped image can provide aclear view of the objects and a context about what the objects weredoing at the time when the image was taken. For example, the server-sideprocess may crop, scale, rotate, and apply a filter to an image, beforetransmitting the image to a mobile device.

Particular embodiments may adjust one or more images for delivery to amobile device based on existing tags in the one or more images. Forexample, particular embodiments may crop an image based on one or moretagged region within the image. As described earlier, a region of animage can be tagged or associated to a user by using the methodsdescribed in U.S. Pat. No. 7,945,653. For example, the server-sideprocess may receive a request for the example image of FIG. 3A from auser's mobile device. The server-side process may access the image(stored in data stores 101) and identify a region being tagged to theuser (e.g., region 320 as illustrated in FIG. 3G). The server-sideprocess can crop the example image of FIG. 3A to include the regiontagged to the user (and fit within the size of the mobile device'sdisplay or a container), as illustrated in FIG. 3G.

Particular embodiments may adjust one or more images for delivery to amobile device based on image quality of the one or more images. Forexample, in response to a user's request, the server-side process mayaccess a photo album (e.g., from a rock concert) and create a photomosaic as illustrated in FIG. 31. For example, the server-side processmay determine a shading level (e.g., by using an image processingsoftware) for each image for the mosaic, and arrange the images based onalternating shading levels, as illustrated in FIG. 31. In addition, forexample, the server-side process may identify one or more photos (fromthe photo album) with one or more faces (or physical objects)corresponding to users (or concepts) that are within a pre-determineddegree separation from the user (e.g., the user's first-degree friends).The server-side process can arrange the identified photos (i.e., photoswith objects more relevant to the user) in larger tiles (e.g., 351, 352)of the mosaic illustrated in FIG. 31.

In particular embodiments, the server-side process may transmit to themobile device one or more of the images as adjusted (204). For example,in response to a request for delivery to a mobile device the exampleimage of FIG. 3A, the server-side process may adjust the example imagebased on the mobile device's display capabilities, and transmit one ormore adjusted images (e.g., the example image of FIG. 3E) to the mobiledevice to be presented in the mobile device's display. In someembodiments, the server-side process may store (or cache) the adjustedcopies of the images in data stores 101. For example, in response to arequest for an image for delivery to a mobile device (201), theserver-side process may access one or more data stores for displaycapabilities of the mobile device (202), or determine displaycapabilities of the mobile device as described earlier, and access datastores 101 for adjusted copies of the image that may match the displaycapabilities of the mobile device. If a matched copy of the image isfound, the server-side process can transmit the matched copy to themobile device (204).

The example method of FIG. 2 can be implemented with contentdistribution network 130. For example, in one embodiment, theserver-side process may receive a request for delivery to a mobiledevice one or more images (201), access one or more data stores fordisplay capabilities of the mobile device (202), or determine displaycapabilities of the mobile device as described earlier, and determineadjustment parameters (e.g., cropping size, cropping coordinates) of oneor more of the images based the display capabilities. The server-sideprocess may transmit to the mobile device a message comprisingadjustment parameters for one or more of the images and a pointer oridentifier of copies of the images stored in content distributionnetwork 130. For example, the message may comprise an URL includingcropping size or coordinates for the images. The mobile device maytransmit the message to content distribution network 130. In response tothe message, application server 131 (or another server-side processhosted by one or more computing devices of content distribution network130) may access content data stores 132 for copies of the images, adjustone or more of the images based on the adjustment parameters (203).Alternatively, Application server 131 may access data stores 132 foradjusted copies of the images that match the adjustment parameters.Application server 131 may transmit to the mobile device one or more ofthe images as adjusted (204). Application Server 131 may store (orcache) the adjusted copies of the images in data stores 132 for lateruse as described earlier.

By way of example and not by way of limitation, example URL's includingadjustment parameters are provided here. For example, an URL for animage of a size of 720×537 can be:

http://photos-d.ak.fbcdn.net/hphotos-ak-snc6/208352_10100149240258148_2729237_49967111_8099422_n.jpgAn URL below illustrates example cropping parameters. In this exampleURL, (183, 0) are the coordinates of the top-left corner of a crop boxand 537×537 is a size of the crop box. The resulting image size is537×537.

http://photos-d.ak.fbcdn.net/hphotos-ak-snc6/c183.0.537.537/208352_10100149240258148_2729237_49967111_8099422_n.jpgAn URL below illustrates example scaling parameters. In this exampleURL, 180×540 defines a size of a box. A server-side process can scaledown the image while preserving aspect ratio until the image can befully contained in the box. The resulting image size is 180×134.

http://photos-d.ak.fbcdn.net/hphotos-ak-snc6/s180x540/208352_10100149240258148_2729237_49967111_8099422_n.jpgAn example URL below includes both cropping and scaling parameters Theresulting image size is 180×180.

http://photos-d.ak.fbcdn.net/hphotos-ak-snc6/c183.0.537.537/s180x540/208352_10100149240258148_2729237_49967111_(—)8099422_n.jpg

Yet in another embodiments, the server-side process may transmit to themobile device a message (e.g., an URL) comprising a pointer oridentifier of copies of the images stored in content distributionnetwork 130. The mobile device may transmit the message to contentdistribution network 130. Alternatively, the mobile device may transmita request for one or more images to content distribution network 130(e.g., an URL for an image can point directly to content distributionnetwork 130). In response to the message (or the direct request),application server 131 (or another server-side process hosted by one ormore computing devices of content distribution network 130) may accessone or more data stores for display capabilities of the mobile device(202), or determine display capabilities of the mobile device asdescribed earlier, and adjust one or more of the images based on thedisplay capabilities (203). Alternatively, Application server 131 mayaccess content data stores 132 for adjusted copies of the images (thatmay match the display capabilities of the mobile device). Applicationserver 131 may transmit to the mobile device one or more of the imagesas adjusted (204). Application Server 131 may store (or cache) theadjusted copies of the images in data stores 132 for later use asdescribed earlier.

FIG. 4 illustrates an example computer system 800, which may be usedwith some embodiments of the present invention. This disclosurecontemplates any suitable number of computer systems 800. Thisdisclosure contemplates computer system 800 taking any suitable physicalform. As example and not by way of limitation, computer system 800 maybe an embedded computer system, a system-on-chip (SOC), a desktopcomputer system, a mobile computer system, a game console, a mainframe,a mesh of computer systems, a server, or a combination of two or more ofthese. Where appropriate, computer system 800 may include one or morecomputer systems 800; be unitary or distributed; span multiplelocations; span multiple machines; or reside in a cloud, which mayinclude one or more cloud components in one or more networks. Whereappropriate, one or more computer systems 800 may perform withoutsubstantial spatial or temporal limitation one or more steps of one ormore methods described or illustrated herein. As an example and not byway of limitation, one or more computer systems 800 may perform in realtime or in batch mode one or more steps of one or more methods describedor illustrated herein. One or more computer systems 800 may perform atdifferent times or at different locations one or more steps of one ormore methods described or illustrated herein, where appropriate.

In particular embodiments, computer system 800 includes a processor 802,memory 804, storage 806, an input/output (I/O) interface 808, acommunication interface 810, and a bus 812. In particular embodiments,processor 802 includes hardware for executing instructions, such asthose making up a computer program. As an example and not by way oflimitation, to execute instructions, processor 802 may retrieve (orfetch) the instructions from an internal register, an internal cache,memory 804, or storage 806; decode and execute them; and then write oneor more results to an internal register, an internal cache, memory 804,or storage 806. In particular embodiments, processor 802 may include oneor more internal caches for data, instructions, or addresses. Inparticular embodiments, memory 804 includes main memory for storinginstructions for processor 802 to execute or data for processor 802 tooperate on. As an example and not by way of limitation, computer system800 may load instructions from storage 806 to memory 804. Processor 802may then load the instructions from memory 804 to an internal registeror internal cache. To execute the instructions, processor 802 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 802 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor802 may then write one or more of those results to memory 804. One ormore memory buses (which may each include an address bus and a data bus)may couple processor 802 to memory 804. Bus 812 may include one or morememory buses, as described below. In particular embodiments, one or morememory management units (MMUs) reside between processor 802 and memory804 and facilitate accesses to memory 804 requested by processor 802. Inparticular embodiments, memory 804 includes random access memory (RAM).This RAM may be volatile memory, where appropriate Where appropriate,this RAM may be dynamic RAM (DRAM) or static RAM (SRAM).

In particular embodiments, storage 806 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 806may include an HDD, a floppy disk drive, flash memory, an optical disc,a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB)drive or a combination of two or more of these. Storage 806 may includeremovable or non-removable (or fixed) media, where appropriate. Storage806 may be internal or external to computer system 800, whereappropriate. In particular embodiments, storage 806 is non-volatile,solid-state memory. In particular embodiments, storage 806 includesread-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), orflash memory or a combination of two or more of these.

In particular embodiments, I/O interface 808 includes hardware,software, or both providing one or more interfaces for communicationbetween computer system 800 and one or more I/O devices. Computer system800 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 800. As an example and not by way of limitation, anI/O device may include a keyboard, microphone, display, touch screen,mouse, speaker, camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 808 for them. Where appropriate, I/O interface 808 mayinclude one or more device or software drivers enabling processor 802 todrive one or more of these I/O devices. I/O interface 808 may includeone or more I/O interfaces 808, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 810 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 800 and one or more other computer systems 800 or one ormore networks. As an example and not by way of limitation, communicationinterface 810 may include a network interface controller (NIC) forcommunicating with an Ethernet or other wire-based network or a wirelessNIC (WNIC) for communicating with a wireless network, such as a WI-FInetwork. This disclosure contemplates any suitable network and anysuitable communication interface 810 for it. As an example and not byway of limitation, computer system 800 may communicate with an ad hocnetwork, a personal area network (PAN), a local area network (LAN), awide area network (WAN), a metropolitan area network (MAN), or one ormore portions of the Internet or a combination of two or more of these.One or more portions of one or more of these networks may be wired orwireless. As an example, computer system 800 may communicate with awireless PAN (WPAN) (e.g., a BLUETOOTH WPAN), a WI-FI network (e.g., a802.11a/b/g/n WI-FI network,), a WI-MAX network, a cellular network(e.g., a Global System for Mobile Communications (GSM) network, a LongTerm Evolution (LTE) network), or other suitable wireless network or acombination of two or more of these.

In particular embodiments, bus 812 includes hardware, software, or bothcoupling components of computer system 800 to each other. As an exampleand not by way of limitation, bus 812 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an INFINIBAND interconnect, a low-pin-count (LPC) bus, amemory bus, a Peripheral Component Interconnect Express or PCI-Expressbus, a serial advanced technology attachment (SATA) bus, aInter-Integrated Circuit (I2C) bus, a Secure Digital (SD) memoryinterface, a Secure Digital Input Output (SDIO) interface, a UniversalSerial Bus (USB) bus, a General Purpose Input/Output (GPIO) bus, oranother suitable bus or a combination of two or more of these. Bus 812may include one or more buses 812, where appropriate.

Herein, reference to a computer-readable non-transitory storage mediummay include a semiconductor-based or other integrated circuit (IC) (suchas, for example, a field-programmable gate array (FPGA) or anapplication-specific IC (ASIC)), a hard disk drive (HDD), a hybrid harddrive (HHD), an optical disc, an optical disc drive (ODD), amagneto-optical disc, a magneto-optical drive, a floppy disk, a floppydisk drive (FDD), magnetic tape, a holographic storage medium, asolid-state drive (SSD), a RAM-drive, a SECURE DIGITAL card, a SECUREDIGITAL drive, another suitable computer-readable non-transitory storagemedium, or a suitable combination of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

This disclosure encompasses all changes, substitutions, variations,alterations, and modifications to the example embodiments herein that aperson having ordinary skill in the art would comprehend. Moreover,reference in the appended claims to an apparatus or system or acomponent of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A method comprising: by one or more computingdevices, receiving a request for an image from a mobile deviceassociated with a user; by one or more computing devices, determiningwhether the user is associated with a preferred orientation for viewingan image; by one or more computing devices, if the user is associatedwith a preferred orientation, then adjusting the image based on one ormore display capabilities of the mobile device, wherein the image isadjusted to have the preferred orientation; and by one or more computingdevices, sending the adjusted image to the mobile device for display. 2.The method of claim 1, further comprising if the user is not associatedwith a preferred orientation, then adjusting the image based on one ormore display capabilities of the mobile device, wherein the adjustingcomprises creating a first version of the image in a portraitorientation and a second version of the image in a landscapeorientation.
 3. The method of claim 1, wherein the preferred orientationis determined based on a usage pattern corresponding to the user.
 4. Themethod of claim 3, wherein the preferred orientation is determined bythe usage pattern corresponding to the user for a particular applicationof the mobile device.
 5. The method of claim 1, wherein the preferredorientation is stored in a data store of the one or more computingdevices.
 6. The method of claim 1, wherein: the request comprises anidentifier of the mobile device; and the one or more displaycapabilities of the mobile device are determined by accessing, based atleast in part on the identifier of the mobile device, one or more datastores for the one or more display capabilities of the mobile device. 7.The method of claim 1, wherein the adjusting the image furthercomprises: identifying one or more objects displayed in the image;determining a relevance of each object in the image to the userassociated with the mobile device; and including in or excluding fromthe image as adjusted one or more of the objects based on theirrelevance to the user.
 8. The method of claim 7, wherein: the one ormore identified objects are associated with one or more tagged regionsof the image; and including in or excluding from the image as adjustedone or more of the objects comprises including or excluding theassociated tagged region of the image.
 9. The method of claim 7,wherein: each of one or more of the objects is a person; and therelevance of a person comprises a social closeness between the user andthe person in a social-networking system.
 10. The method of claim 7,wherein: each of one or more of the objects correspond to one or morenodes in a social graph of a social-networking system; and the relevanceof an object corresponding to one or more nodes in the social graph isbased on an association between a node in the social graph correspondingto the user and one or more of the nodes in the social graphcorresponding to the object.
 11. The method of claim 1, wherein theadjusting the image comprises: scaling the image; applying one or morefilters to the image; rotating the image; or cropping the image.
 12. Themethod of claim 1, wherein the adjusting the image is further based onlocation data indicating a geographic location of a user associated withthe mobile device.
 13. The method of claim 12, further comprising:identifying one or more objects displayed in the image; determining ageographic location of each object in the image; comparing thegeographic location of each object with the geographic location of theuser; and including in or excluding from the image as adjusted one ormore of the objects based on the comparison of the geographic locationof the object and the geographic location of the user.
 14. The method ofclaim 1, wherein the adjusting the image is further based at least inpart on determining whether one or more elements will be overlaid on theimage as displayed on the mobile device.
 15. The method of claim 1,wherein the adjusting the image is further based on image quality of theimage.
 16. One or more computer-readable non-transitory media embodyingsoftware that is operable when executed to: receive a request for animage from a mobile device associated with a user; determine whether theuser is associated with a preferred orientation for viewing an image; ifthe user is associated with a preferred orientation, then adjust theimage based on one or more display capabilities of the mobile device,wherein the image is adjusted to have the preferred orientation; andsend the adjusted image to the mobile device for display.
 17. The mediaof claim 16, further comprising if the user is not associated with apreferred orientation, then adjusting the image based on one or moredisplay capabilities of the mobile device, wherein the adjustingcomprises creating a first version of the image in a portraitorientation and a second version of the image in a landscapeorientation.
 18. The media of claim 16, wherein the preferredorientation is determined based on a usage pattern corresponding to theuser.
 19. The media of claim 18, wherein the preferred orientation isdetermined by the usage pattern corresponding to the user for aparticular application of the mobile device.
 20. A system comprising:one or more processors; and a memory coupled to the processor comprisinginstructions executable by the processors, the processors being operablewhen executing the instructions to: receive a request for an image froma mobile device associated with a user; determine whether the user isassociated with a preferred orientation for viewing an image; if theuser is associated with a preferred orientation, then adjust the imagebased on one or more display capabilities of the mobile device, whereinthe image is adjusted to have the preferred orientation; and send theadjusted image to the mobile device for display.